

<div class="am-cf admin-main">
<div class=" admin-content">
	
		<div class="daohang">
			<ul>
				<li><button type="button" class="am-btn am-btn-default am-radius am-btn-xs"> 首页 </li>
				<li><button type="button" class="am-btn am-btn-default am-radius am-btn-xs">帮助中心<a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close="">×</a></button></li>
				<li><button type="button" class="am-btn am-btn-default am-radius am-btn-xs">奖金管理<a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close="">×</a></button></li>
				<li><button type="button" class="am-btn am-btn-default am-radius am-btn-xs">产品管理<a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close="">×</a></button></li>
            </ul>
        </div>



	
	
	
	

	
	
	


<div class="admin-biaogelist">
	
    <div class="listbiaoti am-cf">
      <ul class="am-icon-flag on"> 兑换金币</ul>
      
      <dl class="am-icon-home" style="float: right;">当前位置： 首页 > <a href="#">兑换金币</a></dl>
      
      <dl>

      </dl>
      <!--这里打开的是新页面-->
      
      
    </div>






    <div class="fbneirong">


        <form class="am-form">


            <div style="margin-left: 200px;">

                <div style="; font-size: 22px;color: red ">每1元可以兑换10金币</div>


            </div>


            <div class="am-form-group am-cf">
                <div class="zuo">确认兑换金额：</div>
                <div class="you">
                    <input type="number" class="am-input-sm" id="doc-ipt-email-1"  name="money" placeholder="请输入金额">
                </div>
            </div>
            <div class="am-form-group am-cf">
                <div class="zuo">可得金币数：</div>
                <div class="you">
                    <input type="text"   name="gold" class="am-input-sm"  style="color: red; font-size: 16px;" id="doc-ipt-email-1" value="" >
                </div>
            </div>

            <div class="am-form-group am-cf">
                <div class="you" style="margin-left: 11%;">
                &nbsp; <div    id="chongzhi" class="am-btn am-btn-secondary am-radius">确认兑换</div>

                </div>
            </div>
        </form>



    </div>
    
    
    
    <script>

        var on_request=false;
        var type=1;
        var page=1;


       $("input[name='money']").change(function () {
           var money = $("input[name='money']").val();
           var gold=money*10;
           $("input[name='gold']").val(gold);
       });


        $("#chongzhi").click(function () {
            pay()
        });

        function pay() {
            if (on_request) {
                return;
            }


            var url = "<?php echo base_url(); ?>/Business/getgoldaction";
            var postdata = {
            };
            var money = $("input[name='money']").val();

            if(money==""){

                alert("请输入金额");return;;
            }

            postdata['money'] =money;
            on_request = true;
            $.post(url, postdata, function (data) {
                on_request = false;
                alert(data.msg);
            },"json");
        }

        function setlisthtnml(data) {
            var html = '';
            if(data.list.length>0){
                $.each(data.list, function (key, value) {
                    html += ' <tr>' +
                        '<td><input type="checkbox" /></td>\n' +
                        ' <td>'+  value.id+'</td>\n' +
                        ' <td>'+value.addtime+'</td>\n' +
                        '  <td>'+value.money+'</td>\n' +
                        '                    <td class="am-hide-sm-only">'+value.money_maker+'</td>\n' +
                        '                    <td class="am-hide-sm-only">'+value.statu+'</td>\n' +

                        '  <td>'+value.remark+'</td>\n' +

                        '  <td>   <div class="am-btn-toolbar">\n' +
                        '                            无\n' +
                        '                        </div>\n' +
                        '                    </td>\n' +
                        '                </tr>';
                });
                $(".impowdith").html(html);
                $('#Pagination').show();
            }else{
                html += '<li><div style="width:100%;text-align:center;">&nbsp暂无数据</div></li>';
                $(".impowdith").html(html);
                $('#Pagination').hide();
            }

        }




        getpaylist();
        function getpaylist() {
            var url = "<?php echo base_url(); ?>/Business/getpaylist";
            var postdata = {
                'page': page
            };
            $.post(url, postdata, function (data) {
                 on_request = false;
                 setlisthtnml(data);
                 setPagination("Pagination", data.count, page, data.epage, function (clickPage) {
                     page = parseInt(clickPage) + 1;
                     getpaylist();
                 });
            },'json');

        }


    </script>
	



 
 
 
 
 <div class="foods">
  <ul>
    版权所有@2015. 
  </ul>
  <dl>
    <a href="" title="返回头部" class="am-icon-btn am-icon-arrow-up"></a>
  </dl>
</div>




</div>

</div>




</div>


<!--<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>-->
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="<?php echo base_url() . 'public/business/'; ?>assets/js/polyfill/rem.min.js"></script>
<script src="<?php echo base_url() . 'public/business/'; ?>assets/js/polyfill/respond.min.js"></script>
<script src="<?php echo base_url() . 'public/business/'; ?>assets/js/amazeui.legacy.js"></script>


<!--[if (gte IE 9)|!(IE)]><!--> 
<script src="<?php echo base_url() . 'public/business/'; ?>assets/js/amazeui.min.js"></script>
<!--<![endif]-->



</body>
</html>